import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: wangxin
 * Date: 2024-08-02
 * Time: 17:13
 */
public class Demo6 {
    public static void main(String[] args) throws IOException {
        File f = new File("text3.txt");

        System.out.println(f.exists());
        //f.createNewFile();
        try(InputStream inputStream = new FileInputStream("text3.txt")){
          while(true){
              int b = inputStream.read();
              if(b == -1){
                  break;
              }
              System.out.printf("0x%x\n",b);
          }
        }catch(IOException e){
            e.printStackTrace();
        }
    }
}
